12#ifndef ROC_PACKET_UNITS_H_
13#define ROC_PACKET_UNITS_H_
82 for (; ch_mask != 0; ch_mask >>= 1) {
const nanoseconds_t Second
One second represented in nanoseconds.
int64_t nanoseconds_t
Nanoseconds.
core::nanoseconds_t timestamp_to_ns(timestamp_diff_t ts, size_t sample_rate)
Convert number of samples to nanoseconds.
blknum_diff_t blknum_diff(blknum_t a, blknum_t b)
Compute difference between two FEC block numbers.
uint32_t source_t
Packet source ID identifying packet stream.
int16_t seqnum_diff_t
Packet sequence numbers difference.
bool seqnum_le(seqnum_t a, seqnum_t b)
Check if a is before or equal to b taking possible wrap into account.
timestamp_diff_t timestamp_from_ns(core::nanoseconds_t ns, size_t sample_rate)
Convert nanoseconds to number of samples.
seqnum_diff_t seqnum_diff(seqnum_t a, seqnum_t b)
Compute difference between two seqnums.
int16_t blknum_diff_t
FEC block numbers difference.
bool timestamp_lt(timestamp_t a, timestamp_t b)
Check if a is before b taking possible wrap into account.
bool blknum_le(blknum_t a, blknum_t b)
Check if a is before or equal to b taking possible wrap into account.
uint16_t seqnum_t
Packet sequence number in packet stream.
uint32_t timestamp_t
Audio packet timestamp.
bool seqnum_lt(seqnum_t a, seqnum_t b)
Check if a is before b taking possible wrap into account.
uint32_t channel_mask_t
Bitmask of channels present in audio packet.
uint16_t blknum_t
FEC block number in a packet stream.
bool blknum_lt(blknum_t a, blknum_t b)
Check if a is before b taking possible wrap into account.
timestamp_diff_t timestamp_diff(timestamp_t a, timestamp_t b)
Compute difference between two timestamps.
int32_t timestamp_diff_t
Audio packet timestamps difference.
bool timestamp_le(timestamp_t a, timestamp_t b)
Check if a is before or equal to b taking possible wrap into account.
Commonly used types and functions.